DATA SEGMENT
	ARR DB 1, 2, 3, 4, 5, 6, 7, 8, 9
	NUM EQU $-ARR
	MX DB ?
	MN DB ?
DATA ENDS

STACK SEGMENT STACK

STACK ENDS

CODE SEGMENT
ASSUME CS:CODE, DS:DATA
START:
	MOV AX, DATA
	MOV DS, AX
	MOV ES, AX
	LEA SI, ARR
	MOV AL, BYTE PTR [SI]
	MOV MX, AL
	MOV MN, AL
	MOV CX, NUM
@0:
	MOV AL, [SI]
	CMP AL, MX
	JBE @1
	MOV MX, AL
	JMP @2
@1:
	CMP AL, MN
	JAE @2
	MOV MN, AL
@2:
	INC SI
	LOOP @0
	INT 3
	MOV AH, 4CH
	INT 21H
CODE ENDS
END START